<include file="public:header" /> <include file="public:left" />
<style>
	th,td {
		text-align: center;
	}
</style>
<section>
	<div class="page_title">
		<h2 class="fl">商品分类列表</h2>
		<form>
			<input type="text" class="page_title_input" name="keyword" placeholder="可搜索标题" value="{$keyword}" style="line-height: 16px;height: 16px;">
			<input  class="page_title_submit" type="submit" value="搜索" style="height: 24px;width: 55px;line-height: 16px;cursor: pointer;">
		</form>
		<a class="fr" href="/admin/goods/add_category.html">商品分类添加</a>
	</div>
	<table class="table">
		<tr>
			<th>标题</th>
			<th>商品图片</th>
			<th>状态</th>
			<th>排序</th>
			<th>操作</th>
		</tr>

		<volist name="list" id="vo" key="k">
		<tr>
			<td style="width: 300px;">{$vo.name}</td>
			<td style="width: 300px;"><img src="{$img_path}{$vo.image}" width="100" height="100"></td>
			<td style="width: 100px;"><if condition="$vo.status eq 1">显示<else />隐藏</if></td>
			<td style="width: 100px;">{$vo.sort}</td>
			<td>
				<a href="{:url('Goods/add_category',array('id'=>$vo['id']))}" class="inner_btn">编辑</a>
				<a href="{:url('Goods/del_category',array('id'=>$vo['id']))}" class="inner_btn">删除</a>
			</td>

		</tr>
            <if condition="array_key_exists('children',$vo)">
                <foreach name="$vo['children']" item="c">
                <tr>
                    <td style="width: 300px;">|--{$c.name}</td>
                    <td style="width: 300px;"><img src="{$img_path}{$c.image}" width="100" height="100"></td>
                    <td style="width: 100px;"><if condition="$c.status eq 1">显示<else />隐藏</if></td>
                    <td style="width: 100px;">{$c.sort}</td>
                    <td>
                        <a href="{:url('Goods/add_category',array('id'=>$c['id']))}" class="inner_btn">编辑</a>
                        <a href="{:url('Goods/del_category',array('id'=>$c['id']))}" class="inner_btn">删除</a>
                    </td>
                </tr>
                </foreach>
            </if>
		</volist>
	</table>
</section>

</div>
</section>
</body>

</html>